fix(TaskProcessing): Normalize file ID before getting node#60218
fix(TaskProcessing): Normalize file ID before getting node#60218marcelklehr wants to merge 1 commit intomasterfrom
Conversation
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
| @@ -1633,9 +1633,16 @@ private function validateOutputFileIds(array $output, ...$specs): array { | |||
| * @throws ValidationException | |||
| */ | |||
| private function validateFileId(mixed $id): File { | |||
There was a problem hiding this comment.
You should only pass int to this function and fix the string wherever it is coming from 🙈
There was a problem hiding this comment.
Please reconsider how task processing works before jumping to conclusions.
There was a problem hiding this comment.
The $id param value originally comes from the task input which can be invalid. We don't know what the API consumer will have set in there. This seems justified to validate this like that.
Or maybe you meant something different.
There was a problem hiding this comment.
I was just suggesting that this kind of validation should probably happen much earlier.
Anyway I'm fine with this, it was only a suggestion and therefore I didn't request changes.
|
/backport to stable32 |
|
/backport to stable33 |
Summary
getFirstNodeByIdwill throw if it gets anything other than an int.Checklist
3. to review, feature component)stable32)AI (if applicable)